<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                template="layout/template.xhtml">
                       
<ui:define name="body">
    
    <h:messages globalOnly="true" styleClass="message"/>
    
    <h:form id="registerForm">

        <rich:panel>
            <f:facet name="header">注册</f:facet>
    
            <s:decorate id="loginNameDecoration" template="layout/edit.xhtml">
                <ui:define name="label">用户名</ui:define>
                <h:inputText id="loginName" required="true"
                             value="#{registerAction.newUser.loginName}"/>
            </s:decorate>
            <s:decorate id="passwordDecoration" template="layout/edit.xhtml">
                <ui:define name="label">密码</ui:define>
				<h:inputSecret id="password" required="true" value="#{registerAction.newUser.password}"/>
            </s:decorate> 
          	<s:decorate id="repasswordDecoration" template="layout/edit.xhtml">
                <ui:define name="label">确认密码</ui:define>
				<h:inputSecret id="repassword" required="true" value="#{registerAction.repassword}"/>
            </s:decorate> 
            <s:decorate id="realNameDecoration" template="layout/edit.xhtml">
                <ui:define name="label">用户昵称</ui:define>
                <h:inputText id="realName" required="true"
                             value="#{registerAction.newUser.realName}"/>
            </s:decorate>
            <s:decorate id="emailDecoration" template="layout/edit.xhtml">
                <ui:define name="label">邮箱</ui:define>
                <h:inputText id="email" required="true"
                             value="#{registerAction.newUser.email}"/>
                                        
            </s:decorate>            
            
            <div style="clear:both"/>
            
        </rich:panel>
        <div class="actionButtons">
            <h:commandButton id="register" 
                          value="注册" 
                         action="#{registerAction.registerUser}"
                         styleClass="inputButton"
                       />                   
        </div>
    </h:form>
    
</ui:define>

</ui:composition>

